home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / Dev / Meshwriter / meshwriter_public.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-03  |  4.4 KB  |  124 lines

  1. /*
  2. **      $VER: meshwriter_public.h 1.00 (14.3.1999)
  3. **
  4. **      Creation date     : 31.10.1998
  5. **
  6. **      Description       :
  7. **         Public type definitions and constants for the mesh writer module.
  8. **
  9. **      Written by Stephan Bielmann
  10. **
  11. **
  12. */
  13.  
  14. #ifndef INCLUDE_MESHWRITER_PUBLIC_H
  15. #define INCLUDE_MESHWRITER_PUBLIC_H
  16.  
  17. /*************************** Includes *******************************/
  18.  
  19. /*
  20. ** Amiga includes
  21. */
  22. #include <exec/types.h>
  23.  
  24. /**************************** Defines *******************************/
  25. /*
  26. ** 3D file types
  27. */
  28. #define  T3DFRAWA   1     /* RAW ASCII            raw    */
  29. #define  T3DFRAWB   2     /* RAW binary           raw    */
  30. #define  T3DFDXF    3     /* AutoCAD DXF          dxf    */
  31. #define  T3DFVRML1  4     /* VRML 1               wrl    */
  32. #define  T3DFPOV3   5     /* POVRay 3.X           pov    */
  33. #define  T3DFLWOB   6     /* Lightwave            lwob   */
  34. #define  T3DFTDDD   7     /* Imagine original     iob    */
  35. #define  T3DFTDDDH  8     /* Imagine huge         iob    */
  36. #define  T3DFREF4   9     /* Reflections 4.X      r4     */
  37. #define  T3DFGEOA   10    /* Videoscape ASCII     geo    */
  38. #define  T3DFREAL   11    /* Real 3D              real   */
  39.  
  40. /*
  41. ** 2D file types
  42. */
  43. #define  T2DFEPS    1     /* Encapsulated PostScript   eps   */
  44. #define  T2DFPSP    2     /* PostScript portrait       ps    */
  45. #define  T2DFPSL    3     /* PostScript landscape      ps    */
  46.  
  47. /*
  48. ** View types
  49. */
  50. #define TVWTOP            1    /* Top view, xy axis               */
  51. #define TVWBOTTOM        2    /* Bottom view, xy axis            */
  52. #define TVWLEFT        3    /* Left view yz axis               */
  53. #define TVWRIGHT        4    /* Right view yz axis              */
  54. #define TVWFRONT        5    /* Front view xz axis              */
  55. #define TVWBACK        6    /* Back view xz axis               */
  56. #define TVWPERSP        7    /* Perspectiv view                 */
  57. #define TVW4SIDES        8    /* Top, front, left and perspecive */
  58.  
  59. /*
  60. ** drawing modes
  61. */
  62. #define TDMPOINTS        1    /* Points, black and white    */
  63. #define TDMGRIDBW        2    /* Grid, black and white      */
  64. #define TDMGRIDGR        3    /* Grid, gray scales          */
  65. #define TDMGRIDCL        4    /* Grid, colors               */
  66. #define TDMSURFBW        5    /* Surface, black and white   */
  67. #define TDMSURFGR        6    /* Surface, gray scales       */
  68. #define TDMSURFCL        7    /* Surface, colors            */
  69.  
  70. /*
  71. ** Return codes, IoErr will be used too to get AmigaDos errors
  72. */
  73. #define RCNOERROR                     0      /* All went well.                           */
  74. #define RCNOMEMORY                    2000   /* No more free memory.                     */
  75. #define RCNOMESH                      2001   /* No mesh to process.                      */
  76. #define RCNOPOLYGON                   2002   /* No polygon  to process.                  */
  77. #define RCNOMATERIAL                    2003   /* No material to process.                  */
  78. #define RCUNKNOWNFTYPE                2004   /* Unkown file type.                        */
  79. #define RCUNKNOWNVTYPE                2005   /* Unkown view type.                        */
  80. #define RCUNKNOWNDMODE                2006   /* Unkown draw mode.                        */
  81. #define RCCHGBUF                      2007   /* Could not change the buffer size.        */
  82. #define RCWRITEDATA                   2008   /* Error occured while writing the file.    */
  83. #define RCVERTEXOVERFLOW              2009   /* Error, too much vertices.                */
  84. #define RCVALUEOUTOFRANGE             2010   /* An argument its value is out of range.   */
  85. #define RCVERTEXINPOLYGONOVERFLOW     2011   /* Error, too much vertices in a polygon.   */
  86. #define RCNOVERTEX                    2012   /* The vertex is not in the mesh.           */
  87. #define RCVERTEXUNDERFLOW             2013   /* Error, not enough vertices.              */
  88. #define RCINVALIDOPERATION            2014   /* The operation you want to do is invalid. */
  89.  
  90. /*
  91. ** CTM operations
  92. */
  93. #define CTMADD        1    /* Add the value to the CTM       */
  94. #define CTMSUB        2    /* Substract the value to the CTM */
  95. #define CTMMUL        3    /* Multiply the value to the CTM  */
  96. #define CTMDIV        4    /* Divide the value to the CTM    */
  97. #define CTMSET        5    /* Set the value in the CTM       */
  98. #define CTMRESET    6    /* Reset the value in the CTM     */
  99.  
  100. /*********************** Type definitions ***************************/
  101.  
  102. /*
  103. ** Primitive types
  104. */
  105. typedef FLOAT TOCLFloat;
  106.  
  107. /*
  108. ** Vertex structure
  109. */
  110. typedef struct {
  111.     TOCLFloat x,y,z;
  112. }TOCLVertex;
  113.  
  114. /*
  115. ** Color structure
  116. */
  117. typedef struct {
  118.     UBYTE r,g,b;
  119. }TOCLColor;
  120.  
  121. #endif
  122.  
  123. /************************* End of file ******************************/
  124.